﻿// See https://aka.ms/new-console-template for more information
using Hyjx.GF.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

string connectionString = "Filename=D:\\Temp\\GanFengDB.db3;Password=123456";

IHostBuilder hostBuilder = Host.CreateDefaultBuilder(args)
    .ConfigureServices((hostContext, services) =>
    {
        services.AddDbContext<GFDbContext>((option) =>
        {
            option.UseSqlite(connectionString);
        });
    });
// 建造 Host
IHost host = hostBuilder.Build();
